Subject: bum7 newstuff
From: Acid Software <[email-masked]>
To: blitz list <[email-masked]>
Date: Tue, 6 Sep 1994 12:51:36 +1200 (NZST)

BUM7 MAIN DOC

Updates and Fixes to Blitz2 v1.9
--------------------------------

Stability

Several improvements have been made to the stability of Blitz2 programs.
First up all string commands have been fixed to both work properly with
the null-termination system introduced in v.18 (our apologies here) and
error checking has been added. No longer will system crashes be caused
with illegal size parameters in mid$() etc.

Also, the ASMEND command has been added. Using assembler in statements
and functions use to require the use of UNLK A4 and RTS. This system
did not work properly when runtime errors were enabled. A fullproof
method is now available, simply use the ASMEND command in place of any
RTS commands. Blitz2 will look after the unlinking of A4, allow for
runtime errors and then do an RTS. Finally my darts demo runs with
runtime errors enabels (yipeeee!).

And finally, runtime error checking has been added for square bracket
arrays. Yup, out of range checking has been incorporated for those of
us whose first guess at why our programs were crashing was to go through
and check such usage manually. This with the new string checking and the
sexy new debugger should return a few people to using Blitz2's runtime
debugging features. Thanks to all those and their abuse for helping us
get these problems resolved.

Debugging

The debugger is now a separate program that is launched by Blitz2 when a
prgram is run (runtime errors enabled of course).

The gadgets in the window allow the programmer access to the standard
debugging features. CtrlAltC can still be used to halt programs, especially
those using Slices and Displays in Blitz mode.

By increasing the size of the window the program listing can be viewed.

A PANIC! button has also been introduced once a program is launched from
the editor. Yup, programs are now launched not run so those into weird
system crashes may be able to return to Ted leaving their programs disabled
in memory. A REBOOT button may have been more useful...

The source code for the default debugger is included in the acidlibsrc
directory of the libsdev archive. It is extremely well documented by
Mark so those wanting to extend the functionality of the system are
most welcome. Serial port support for using a remote terminal would
be very nice.

Interupts and BlitzKeys

BlitzKeys, BlitzKeys, BlitzKeys. A common profanity used by those of us
use to keyboard lock ups in keyboard based Blitz games (especially
SkidMarks). Well no more!

Blitz now leaves Amiga interupts enabled in Blitz mode. This means that
not only is the system keyboard interupt still running (thank the lord)
but any SetInts initiated in Amiga mode will continue.

Other advantages are that Blitz mode is now more acceptable to the CD32
environment and RawStatus can be used in Amiga mode for keyboard games
not wanting to run in Windows (yuck).

Blitzkeys On now does a bit of a "BlitzkeysInput" for one character inputs
only, any other inputs use the previously defined Input channel.

Blitzkeys Off no longer exists. BlitzRepeat has gone (no repeating keys).

Serial Stuff

Peter Tavinor has upgraded the Serial Library. ReadSerial now return a
word (read unsigned byte) so chr$(255) is acceptable. WriteSerialString
includes flags for DoIO and True String (not null terminated). ReadSerial
has a new flag "WaitForChar"

GadTools

The GTPalette has had several default tags removed as they crashed under
2.0 (yeh, great, just what tags are suppose to avoid). AttachGTList had
a minor problem in some situations (now fixed).

Another bug that has been found in GadTools under 2.0 is that GTLists
actually allocate gadget id's for internal use. Besides being completely
unethical (and fixed in 3.0) it means that programmers should use id
values of greater than 50 to avoid this system bug. Adding GTLists last
in your list should also work although their id's should be more than the
number of lines of text they should display (no I am not going to explain
further).

ScreensLib

The Screen command now rounds the width up to the nearest multiple of 16
rather than causing the error "Screen Width Must be a multiple of 16".
Common sense I think.

ValLib

Val() now accepts hex and binary strings (preceeded by "$" and "%" of course.)
Because Val() returns a float it should not be used to evaluate 32 bit integers
(longs).

Display Library

A quick version of the InitCoplist command has been included which calculates
the number of colours, sprites and size depending on just the type parameter.

As promised the Display library now sports new commands for palette effects
and so forth. There are two varieties of copper based commands, the first
allows the user to insert a new palette or copperstring at a certain line
of the display, the other allows control of each and every line of the
display.

For line based effects a negative value should be used in combination
with the numcustoms parameter of the InitCopList command. Color splits,
bitmap scrolling, scan doubling/trebling/quadrupling and custom copper
strings can now be acheived on a line by line basis.

Palette Library.

A number of commands have been added to the Palette library for use mainly
with the display library. Fades and Colour cycling can now be performed on
palette objects themselves (rather than on screens and slices) and hence
can be used in conjunction with the DisplayPalette command.

Banks and Decoding.

Decode commands have been added to allow programmers to both include shapes,
sounds, palettes, music and ILBM's (IFF bitmaps) in their programs or from
preloaded files (mainly using the LoadBank command or unpacking type commands).

To include such files in the program the incbin command is used. Typically
a list of included files will be situated at the bottom of the listing (with
and End statement just above to be safe). Each IncBin will be preceeded by
a label and the ?label syntax would be used to pass the location of each
included file to the appropriate Decode command at the top of the program.

Those unhappy with the slow but memory unhungry LoadBitMap command can take
advantage of the fast but memory hungry method of loading iff/ilbm files
with the code listed in the DecodeILBM command description.

New Commands
------------

   GTStatus(GTList#,Id) ;bbgtlib
   GTArrowSize size       ;bbgtlib
   DecodeILBM BitMap#,MemoryLocation ;ilbmifflib
   DecodeSound Sound#,MemoryLocation ;audiolib
   DecodePalette Palette#,MemoryLocation[,Palette Offset] ;palettelib
   DecodeMedModule MedModule#,MemoryLocation ;medlib
   DecodeShapes Shape#[,Shape#],MemoryLocation ;shapeslib
   InitShape Shape#,Width,Height,Depth ;shapeslib
   SetPeriod Sound#,Period ;audiolib ;audiolib
   Bank(Bank#)
   LoadBank Bank#,FileName$[,MemType]
   AllocMem (size,type) ;banklib
   FreeMem location,size ;banklib
   BlockScroll X1,Y1,Width,Height,X2,Y2[,BitMap#] ;scrolllib
   ClipBlitMode BPLCON0  ;2dlib
   CyclePalette Palette# ;palettelib
   FadePalette SrcPalette#,DestPalette#,Brightness.q ;palettelib
   InitPalette Palette#,NumColors ;palettelib
   PaletteRange Palette#,StartCol,EndCol,r0,g0,b0,r1,g1,b1 ;palettelib
   DuplicatePalette SrcPalette#,DestPalette# ;palettelib
   SavePalette Palette#,FileName$ ;iffmakelib
   CustomColors CopList#,CCOffset,YPos,Palette,startcol,numcols ;displaylib
   CustomString CopList#,CCOffset,YPos,Copper$ ;displaylib
   DisplayDblScan CopList#,Mode[,copoffset] ;displaylib
   DisplayRainbow CopList#,Register,Palette[,copoffset] ;displaylib
   DisplayRGB CopList#,Register,line,r,g,b[,copoffset] ;displaylib
   DisplayUser CopList#,Line,String[,Offset] ;displaylib
   DisplayScroll CopList#,&xpos.q(n),&xpos.q(n)[,Offset] ;displaylib
   ReadSerialMem Unit#,Address,Length ;seriallib
   WriteSerialMem Unit#,Address,Length ;seriallib
   PopInput & PopOutput ;inputoutputlib
   GameB(por#) ;gameiolib
   NumPars ;cliargslib
   Par$(parameter#) ;cliargslib
   FromCLI ;cliargslib
   ParPath$ (parameter,type) ;cliargslib